]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: use alignment rather than gravity to position the summary
authorDan Winship <danw@gnome.org>
Fri, 7 Jan 2011 16:59:20 +0000 (11:59 -0500)
committerDan Winship <danw@gnome.org>
Mon, 10 Jan 2011 20:22:50 +0000 (15:22 -0500)
Actors in clutter are supposed to be re-allocated with
Clutter.AllocationFlags.ABSOLUTE_ORIGIN_CHANGED if they move relative
to the screen, even if they don't move relative to their parent.
Currently this does not work correctly for actors inside containers
with non-northwest gravity. This is probably a fixable bug, but
gravity has messed up other things in the past too, so let's just not
use it.

This change ensures that summary trayicons are re-allocated when the
summary animates, and is part of the fix for
https://bugzilla.gnome.org/show_bug.cgi?id=635695

js/ui/messageTray.js

index 3593274188e44c7ed694b6d1c3107b82a597c8cd..04a968b56aeeae21750356a5c2dcb7398da6d886 100644 (file)
@@ -916,7 +916,7 @@ MessageTray.prototype = {
         this._notification = null;
         this._notificationClickedId = 0;
 
-        this._summaryBin = new St.Bin({ anchor_gravity: Clutter.Gravity.NORTH_EAST });
+        this._summaryBin = new St.Bin({ x_align: St.Align.END });
         this.actor.add_actor(this._summaryBin);
         this._summary = new St.BoxLayout({ name: 'summary-mode',
                                            reactive: true,
@@ -1008,9 +1008,8 @@ MessageTray.prototype = {
         this.actor.width = primary.width;
         this._notificationBin.x = 0;
         this._notificationBin.width = primary.width;
-
-        // These work because of their anchor_gravity
-        this._summaryBin.x = primary.width;
+        this._summaryBin.x = 0;
+        this._summaryBin.width = primary.width;
     },
 
     contains: function(source) {